home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 February / Chip_2003-02_cd1.bin / zkuste / xptools / install / Xsetup / setup.exe / {app} / plugins / XQ Context Menu Options 4.xpL < prev    next >
Text File  |  2002-10-20  |  3KB  |  87 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="7"
  3. "COUNT"="3"
  4. "UIPATH 1"="Appearance\Files&Folders\Files"
  5. "UIPATH 2"="System\Advanced Performance Settings"
  6. "NAME"="Start High Priority Context Menu"
  7. "VERSION"="2.42"
  8. "LANGUAGE"="VBScript"
  9. "OSVERSION"="010101"
  10. "TEXT 1"="Do not add "Start high priority" command for EXE files"
  11. "TEXT 2"="Enable command on context menu for EXE files"
  12. "TEXT 3"="Enable command as default command for EXE files"
  13. "DESCRIPTION 1"="If "Start high priority" is enabled, the command "Start High Priority" will appear if you right-click a EXE file."
  14. "DESCRIPTION 2"="Selecting this command will force Windows to execute the currently selected file with maximum priority."
  15. "DESCRIPTION 3"="The third option will make this the default option for all EXE files. Use this with caution as you may adversely affect system speed and stability if you run too many programs with high priority."
  16. "AUTHOR"="Xteq Systems"
  17. "CONTACTURL"="http://www.xteq.com/"
  18. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  19. "COMMENT 1"="Found at http://snakefoot.homestead.com/files/tweak/winnt/tweak.html (Credits: www.ntfaq.com)" 
  20.  
  21.  
  22.  
  23.  
  24. Sub Plugin_Initialize 
  25.  s=RegReadValue("HKCR\exefile\Shell\XQSHP\Command\@")
  26.  t=RegReadValue("HKCR\exefile\Shell\@")
  27.  
  28.  if Len(s)>0 then
  29.     Call SetUIElement(2,true)
  30.     if t="XQSHP" then
  31.        Call SetUIElement(3,true)
  32.     end if
  33.  else
  34.     Call SetUIElement(1,true)
  35.  end if 
  36. End Sub
  37.  
  38. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  39.  
  40.  if GetUIElement(1)=true then
  41.     'Disable it!
  42.  
  43.     if RegPathExists("HKCR\exefile\Shell\XQSHP") then
  44.        Call RegDeletePath("HKCR\exefile\Shell\XQSHP\Command")
  45.        Call RegDeletePath("HKCR\exefile\Shell\XQSHP")
  46.     end if
  47.  
  48.  else
  49.  
  50.     s=""
  51.     bW9x=false
  52.  
  53.     If GetWinVer=1 or GetWinVer=3 or GetWinVer=5 then
  54.        bW9x=true
  55.     else
  56.        bW9x=false
  57.     end if
  58.  
  59.  
  60.     if bW9x=true then
  61.        s=GetWinDir
  62.        s=s & "command.com /c start ""XQSHP"" /high ""%1"""
  63.     else
  64.        'Windows NT/2000
  65.        s=GetWinSysDir
  66.        s=s & "cmd.exe /c start ""XQSHP"" /high ""%1"""
  67.     end if
  68.  
  69.     Call RegWriteValue("HKCR\exefile\Shell\XQSHP\@","Start &High priority",1)
  70.     Call RegWriteValue("HKCR\exefile\Shell\XQSHP\Command\@",s,1)
  71.  
  72.     ' START Neil's new code for the default action option
  73.     if GetUIElement(3)=true then
  74.        Call RegWriteValue("HKCR\exefile\Shell\@","XQSHP",1)
  75.     else
  76.        Call RegWriteValue("HKCR\exefile\Shell\@","open",1)
  77.     end if
  78.     ' bugfixed by TeX HeX
  79.  
  80.  end if
  81.  
  82.  
  83. End Sub
  84.  
  85. Sub Plugin_Terminate 
  86. End Sub
  87.